Skip to content

Conversation

@bguiz
Copy link
Collaborator

@bguiz bguiz commented Oct 29, 2025

Summary by CodeRabbit

  • Documentation

    • Restructured navigation with a new "Start here" entry and organized developer topics into collapsible groups (DeFi, Infrastructure, Developers, EVM Developers, Cosmwasm Developers, DeFi Developers, Native Developers)
    • Standardized formatting and improved readability across multiple documentation pages
  • Chores

    • Added documentation automation script for Injective projects

@bguiz bguiz changed the title feat: render native mdoule docs feat: render native module docs Oct 29, 2025
@coderabbitai
Copy link

coderabbitai bot commented Oct 29, 2025

Walkthrough

This PR removes icon metadata fields from various documentation front matter, eliminates order directives from EVM module documentation files, restructures the navigation configuration in docs.json with a new "Start here" group and "More" section, updates documentation formatting and content in core modules, and introduces an automation script for copying Injective documentation.

Changes

Cohort / File(s) Summary
Icon metadata removal from top-level docs
\.gitbook/defi.mdx, \.gitbook/developers-cosmwasm.mdx, \.gitbook/developers-defi.mdx, \.gitbook/developers-evm.mdx, \.gitbook/developers-native.mdx, \.gitbook/developers.mdx, \.gitbook/infra.mdx
Removed icon: field from front matter in seven MDX files (e.g., icon: coins, icon: comet, icon: laptop-code, icon: money-bill-transfer, icon: microchip, icon: network-wired). No other content changes.
Order directive removal from EVM docs (MDX)
\.gitbook/developers-native/injective/evm/{01_concepts,02_state,03_state_transitions,04_transactions,05_abci,06_hooks,07_events,08_params,09_client}\.mdx
Removed HTML comment blocks containing <!-- order: [1-9] --> metadata directives from the top of nine EVM documentation files. Associated stray blank lines or dashes also removed. No content or functional changes.
Order directive removal from EVM docs (MD)
\.gitbook/developers/modules/injective/evm/{01_concepts,02_state,03_state_transitions,04_transactions,05_abci,06_hooks,07_events,08_params,09_client}\.md
Removed HTML comment blocks with <!-- order: [1-9] --> metadata and associated blank lines from nine EVM module Markdown files. Mirrored changes to MDX counterparts.
Core module documentation updates
\.gitbook/developers-native/core/circuit\.mdx, \.gitbook/developers-native/core/crisis\.mdx, \.gitbook/developers-native/core/gov\.mdx, \.gitbook/developers-native/core/group\.mdx
Documentation formatting and content improvements including reworded sentences, normalized terminology (e.g., emphasis formatting), consistent code block labeling (e.g., \``protobuf reference`), reformatted tables and lists, adjusted punctuation and spacing, and minor grammatical refinements. No functional or API changes.
Navigation structure restructuring
\.gitbook/docs\.json
Replaced root "Injective" group with "Start here" containing README; added expanded and icon properties to navigation groups (DeFi, Infrastructure, Developers, EVM Developers, Cosmwasm Developers, DeFi Developers, Native Developers); created new "More" group containing faq, glossary, and references pages.
Documentation automation script
scripts/copy-injective-docs\.sh
New Bash script for automating documentation copying: clones injective-core (master) and cosmos-sdk (v0.50.x-inj) repositories, runs error documentation generation, copies README and spec files into local directories, applies module reference path fixes via sed substitutions, and performs cleanup of temporary files.

Sequence Diagram(s)

sequenceDiagram
    participant Script as copy-injective-docs.sh
    participant Temp as Temp/Build Dir
    participant Repos as GitHub Repos
    participant Local as Local Output Dirs
    
    Script->>Temp: Create/clean directories
    Script->>Repos: Clone injective-core & cosmos-sdk<br/>(shallow clone)
    Repos-->>Temp: Repository contents
    Script->>Temp: Run generate_errors_docs.sh
    Script->>Local: Copy README.md & spec content<br/>(preserve structure)
    Script->>Local: Copy stub markdown files<br/>to module READMEs
    Script->>Local: Fix import paths via sed
    Script->>Temp: Clean stray files & remove temp dir
    Note over Local: Documentation ready for use
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Icon and metadata removals are highly repetitive and low-risk (16 files total across two cohorts with consistent simple deletions)
  • Core module documentation updates are coherent formatting/content improvements across 4 files; each requires careful review to ensure no semantic loss
  • docs.json restructuring requires careful verification of group hierarchy, expanded states, icon mappings, and that no pages are orphaned or lost
  • New bash script requires review for correctness of command order, path handling, error conditions, and cleanup logic

Areas requiring extra attention:

  • Verify docs.json restructuring preserves all page references and produces intended navigation structure
  • Confirm bash script error handling and that all cloned repositories use correct branches and paths
  • Review core module documentation updates for any unintended semantic changes or loss of meaning

Poem

🐰 ✨ Hop along as docs find new order,
Icons rest while nav takes the border!
Metadata tidied, content takes flight,
A script automates work—what a sight! 🚀

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The pull request title "feat: render native module docs" directly aligns with the stated objective of adding support to render native module documentation. The changeset encompasses modifications to multiple documentation files (.gitbook files), removal of MDX-incompatible metadata elements (front-matter icons and HTML comment blocks), restructuring of navigation configuration in docs.json, and addition of an automation script (copy-injective-docs.sh) to facilitate documentation copying from upstream repositories. The title accurately captures the primary purpose of enabling native module documentation rendering without being vague or misleading.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/native

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 12

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
.gitbook/developers-native/core/group.mdx (2)

1888-1888: Missing closing brace in REST JSON example.

The JSON object in the GroupPoliciesByAdmin example at line 1888 is incomplete—the closing } is missing.

Apply this diff:

      },
    }
  ],
  "pagination": {
    "next_key": null,
    "total": "2"
+ }
}

2025-2025: Fix inconsistent API version in URL.

Line 2025 uses /cosmos/group/v1beta1/ in the URL path, but all other REST endpoints use /cosmos/group/v1/. This should be consistent.

Apply this diff:

- curl localhost:1317/cosmos/group/v1beta1/vote_by_proposal_voter/1/cosmos1..
+ curl localhost:1317/cosmos/group/v1/vote_by_proposal_voter/1/cosmos1..
🧹 Nitpick comments (4)
.gitbook/developers-native/core/circuit.mdx (1)

7-7: Simplify "able to" to "can".

The phrase "is able to" can be more concisely expressed as "can" for better readability.

- Circuit Breaker works with the idea that an address or set of addresses have the right to block messages from being executed and/or included in the mempool. Any address with a permission is able to reset the circuit breaker for the message.
+ Circuit Breaker works with the idea that an address or set of addresses have the right to block messages from being executed and/or included in the mempool. Any address with a permission can reset the circuit breaker for the message.
scripts/copy-injective-docs.sh (3)

64-80: Use find with -exec to avoid shell loop fragility and make sed more portable.

The bash for-loop and sed -ie pattern is non-portable and fragile. The -ie flag creates unwanted backup files requiring manual cleanup (lines 82–83). Use find -exec instead for robustness.

Apply this diff:

-## authz
-search1="(../modules/auth/)"
-replace1="(../auth/)"
-
-FILES=$( find $CORE_DIR/authz -type f )
-
-for file in $FILES
-do
-	sed -ie "s/${search1//\//\\/}/${replace1//\//\\/}/g" $file
-done
-
-## auth
-search2="(../modules/authz/)"
-replace2="(../authz/)"
-
-FILES=$( find $CORE_DIR/auth -type f )
-
-for file in $FILES
-do
-	sed -ie "s/${search2//\//\\/}/${replace2//\//\\/}/g" $file
-done
+## authz
+find "$CORE_DIR/authz" -type f -exec sed -i 's|(../modules/auth/)|(../auth/)|g' {} \;
+
+## auth
+find "$CORE_DIR/auth" -type f -exec sed -i 's|(../modules/authz/)|(../authz/)|g' {} \;

This approach:

  • Avoids shell loop vulnerabilities
  • Uses -i without the problematic -e flag
  • Eliminates backup file artifacts
  • Simplifies the code significantly

82-83: Use -f flag with rm or remove these lines after refactoring sed usage.

These rm commands assume the .mde files exist. Without the -f flag, they will fail if files are missing (though the script will continue due to lack of error handling). Ideally, refactor the sed commands (as suggested above) to eliminate the backup artifacts entirely.

If keeping the current sed approach, make rm safer:

-rm $CORE_DIR/authz/README.mde
-rm $CORE_DIR/auth/README.mde
+rm -f "$CORE_DIR/authz/README.mde"
+rm -f "$CORE_DIR/auth/README.mde"

Alternatively, after implementing the find/sed refactor above, remove these lines entirely.


4-13: Quote variables in rm and other shell commands for safety.

Unquoted variables in shell commands can cause unexpected behavior if they contain spaces or are empty. Quote all variable expansions, especially in destructive operations like rm -rf.

Apply this diff to improve robustness throughout:

-mkdir -p $BUILD_DIR
-rm -rf $CORE_DIR
-rm -rf $INJECTIVE_DIR
-mkdir -p $CORE_DIR
-mkdir -p $INJECTIVE_DIR
+mkdir -p "$BUILD_DIR"
+rm -rf "$CORE_DIR"
+rm -rf "$INJECTIVE_DIR"
+mkdir -p "$CORE_DIR"
+mkdir -p "$INJECTIVE_DIR"

And at the end:

-rm -rf $BUILD_DIR
+rm -rf "$BUILD_DIR"

Also quote all other variable references:

-for D in ./$BUILD_DIR/cosmos-sdk/x/*; do
+for D in "$BUILD_DIR"/cosmos-sdk/x/*; do
-for D in ./$BUILD_DIR/injective-core/injective-chain/modules/*; do
+for D in "$BUILD_DIR"/injective-core/injective-chain/modules/*; do

Also applies to: 84-84

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b30c5ce and 5da8154.

📒 Files selected for processing (31)
  • .gitbook/defi.mdx (0 hunks)
  • .gitbook/developers-cosmwasm.mdx (1 hunks)
  • .gitbook/developers-defi.mdx (1 hunks)
  • .gitbook/developers-evm.mdx (1 hunks)
  • .gitbook/developers-native.mdx (1 hunks)
  • .gitbook/developers-native/core/circuit.mdx (5 hunks)
  • .gitbook/developers-native/core/crisis.mdx (4 hunks)
  • .gitbook/developers-native/core/gov.mdx (35 hunks)
  • .gitbook/developers-native/core/group.mdx (34 hunks)
  • .gitbook/developers-native/injective/evm/01_concepts.mdx (0 hunks)
  • .gitbook/developers-native/injective/evm/02_state.mdx (0 hunks)
  • .gitbook/developers-native/injective/evm/03_state_transitions.mdx (0 hunks)
  • .gitbook/developers-native/injective/evm/04_transactions.mdx (0 hunks)
  • .gitbook/developers-native/injective/evm/05_abci.mdx (0 hunks)
  • .gitbook/developers-native/injective/evm/06_hooks.mdx (0 hunks)
  • .gitbook/developers-native/injective/evm/07_events.mdx (0 hunks)
  • .gitbook/developers-native/injective/evm/08_params.mdx (0 hunks)
  • .gitbook/developers-native/injective/evm/09_client.mdx (0 hunks)
  • .gitbook/developers.mdx (0 hunks)
  • .gitbook/developers/modules/injective/evm/01_concepts.md (0 hunks)
  • .gitbook/developers/modules/injective/evm/02_state.md (0 hunks)
  • .gitbook/developers/modules/injective/evm/03_state_transitions.md (0 hunks)
  • .gitbook/developers/modules/injective/evm/04_transactions.md (0 hunks)
  • .gitbook/developers/modules/injective/evm/05_abci.md (0 hunks)
  • .gitbook/developers/modules/injective/evm/06_hooks.md (0 hunks)
  • .gitbook/developers/modules/injective/evm/07_events.md (0 hunks)
  • .gitbook/developers/modules/injective/evm/08_params.md (0 hunks)
  • .gitbook/developers/modules/injective/evm/09_client.md (0 hunks)
  • .gitbook/docs.json (8 hunks)
  • .gitbook/infra.mdx (0 hunks)
  • scripts/copy-injective-docs.sh (1 hunks)
💤 Files with no reviewable changes (21)
  • .gitbook/developers-native/injective/evm/08_params.mdx
  • .gitbook/developers/modules/injective/evm/05_abci.md
  • .gitbook/developers-native/injective/evm/07_events.mdx
  • .gitbook/developers/modules/injective/evm/04_transactions.md
  • .gitbook/developers-native/injective/evm/06_hooks.mdx
  • .gitbook/developers/modules/injective/evm/02_state.md
  • .gitbook/developers/modules/injective/evm/09_client.md
  • .gitbook/infra.mdx
  • .gitbook/developers/modules/injective/evm/01_concepts.md
  • .gitbook/developers/modules/injective/evm/08_params.md
  • .gitbook/developers-native/injective/evm/02_state.mdx
  • .gitbook/developers-native/injective/evm/04_transactions.mdx
  • .gitbook/defi.mdx
  • .gitbook/developers/modules/injective/evm/03_state_transitions.md
  • .gitbook/developers/modules/injective/evm/06_hooks.md
  • .gitbook/developers-native/injective/evm/03_state_transitions.mdx
  • .gitbook/developers/modules/injective/evm/07_events.md
  • .gitbook/developers-native/injective/evm/01_concepts.mdx
  • .gitbook/developers.mdx
  • .gitbook/developers-native/injective/evm/05_abci.mdx
  • .gitbook/developers-native/injective/evm/09_client.mdx
🧰 Additional context used
🪛 LanguageTool
.gitbook/developers-native/core/circuit.mdx

[grammar] ~5-~5: Use a hyphen to join words.
Context: ...ed. When operating a chain, if it is app specific then a halt of the chain is les...

(QB_NEW_EN_HYPHEN)


[style] ~7-~7: As a shorter alternative for ‘able to’, consider using “can”.
Context: ... mempool. Any address with a permission is able to reset the circuit breaker for the messa...

(BE_ABLE_TO)

.gitbook/developers-native/core/gov.mdx

[grammar] ~13-~13: Use a hyphen to join words.
Context: ...une 2016. The module enables Cosmos SDK based blockchain to support an on-chain ...

(QB_NEW_EN_HYPHEN)


[style] ~134-~134: Consider using “who” when you are referring to people instead of objects.
Context: ... Participants Participants are users that have the right to vote on proposals. On...

(THAT_WHO)


[grammar] ~201-~201: Ensure spelling is correct
Context: ... This means that proposals are accepted iff: * There exist bonded tokens. * Quorum has ...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[style] ~238-~238: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ... quorum. * BurnProposalDepositPrevote burns the proposal deposit if it does not ent...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[grammar] ~246-~246: Ensure spelling is correct
Context: ...s a string field intended to be used to descibe the purpose of a particular blockchain,...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[grammar] ~261-~261: Ensure spelling is correct
Context: ...fferent founding groups, have different interpertations of the purpose of the network. This ge...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[grammar] ~263-~263: Ensure spelling is correct
Context: ... a much clearer idea of purpose and the expecations placed on them while operating thier no...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[grammar] ~263-~263: Ensure spelling is correct
Context: ...ecations placed on them while operating thier nodes. Likewise, for community members...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[grammar] ~265-~265: Ensure spelling is correct
Context: ... be changed by governance. Communities whishing to make amendments to their original co...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[style] ~265-~265: Consider shortening this phrase to strengthen your wording.
Context: ...by governance. Communities whishing to make amendments to their original constitution should use ...

(MAKE_CORRECTIONS)


[style] ~317-~317: As an alternative to the over-used intensifier ‘very’, consider replacing this phrase.
Context: ...as changing various parameters. This is very simple to do. First, write out your message ty...

(EN_WEAK_ADJECTIVE)


[style] ~415-~415: In contexts where ‘if’ is followed by ‘or’, using ‘whether’ may be more appropriate (and formal).
Context: ...a single byte. This allows us to know if a proposal is in the voting period or n...

(IF_WHETHER)


[style] ~560-~560: As a shorter alternative for ‘able to’, consider using “can”.
Context: ...starts. From there, bonded Atom holders are able to send MsgVote transactions to cast the...

(BE_ABLE_TO)


[style] ~572-~572: ‘take into account’ might be wordy. Consider a shorter alternative.
Context: ...::note Gas cost for this message has to take into account the future tallying of the vote in EndB...

(EN_WORDINESS_PREMIUM_TAKE_INTO_ACCOUNT)


[style] ~2533-~2533: Consider a more concise word here.
Context: ... so that payment can always be honored. In order to link a SoftwareUpgradeProposal to a...

(IN_ORDER_TO_PREMIUM)

.gitbook/developers-native/core/group.mdx

[grammar] ~65-~65: Ensure spelling is correct
Context: ...weight. It does have an "administrator" which has the ability to add, remove and upda...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[grammar] ~213-~213: Ensure spelling is correct
Context: ...decision policy's rules, which can be trigged by a Msg/Exec or a `Msg/{SubmitProp...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

🔇 Additional comments (17)
.gitbook/developers-native/core/circuit.mdx (4)

13-21: Verify code fence reference labels are supported.

The code fences now use labeled syntax (\``go reference, ```protobuf reference`) instead of generic labels. This appears to be for MDX compatibility as mentioned in the PR objectives. Please confirm that your documentation platform (Mintlify) recognizes and properly renders these reference labels.


23-26: Admonition syntax looks good.

The ::: note ... ::: syntax is valid MDX for rendering admonitions. Ensure your platform supports this component syntax.


32-32: Formatting consistency improvements approved.

The spacing adjustments around inline code, arrows, and table formatting (e.g., AccountPermissions, DisableList, Events tables) improve clarity and consistency with MDX standards. These changes align well with the PR's goal of making documentation valid MDX.

Also applies to: 65-65, 138-162


102-104: Code fence reference labels applied consistently.

The protobuf reference code fences follow the same pattern as the Go reference fences. Consistency is maintained across the document.

Please verify that these reference labels are properly resolved by your documentation rendering engine.

Also applies to: 112-114, 122-124

.gitbook/developers-native.mdx (1)

1-3: LGTM – Icon metadata removal is consistent with PR-wide cleanup.

.gitbook/developers-evm.mdx (1)

1-3: Verify YAML front matter syntax.

The AI summary mentions a stray + line within the front matter. While the annotated code shows whitespace at line 2, this could create invalid YAML if present. Please confirm the front matter is valid and adheres to MDX/YAML standards.

.gitbook/developers-cosmwasm.mdx (1)

1-3: LGTM – Icon metadata removal is consistent with the broader cleanup effort.

.gitbook/developers-defi.mdx (1)

1-3: LGTM – Icon metadata cleanup is consistent with the PR theme.

.gitbook/docs.json (2)

15-21: Well-structured navigation refactor – The new "Start here" group with expanded: true improves discoverability for new users. Centralized icon management in docs.json is cleaner than distributed front matter.


608-616: Good consolidation of secondary content – Moving faq, glossary, and references to a "More" section with expanded: true reduces clutter while keeping them accessible.

.gitbook/developers-native/core/gov.mdx (3)

5-5: Update header formatting – Use backticks for module names consistently: `x/gov` is correct (already shown), but verify this pattern throughout.


1551-1551: TODO comments in place – Lines 1551 and 2232 contain MDX TODO comments referencing cosmos-sdk issue #10197. Verify these are intentional carry-overs from upstream and that they don't represent unresolved blockers for this PR.

Also applies to: 2232-2232


9-27: Content quality looks solid overall – The refactored governance module documentation is well-structured with clear sections, proper markdown formatting, and comprehensive coverage of concepts, state, messages, and client interactions. The textual changes appear to improve clarity while maintaining technical accuracy.

.gitbook/developers-native/core/group.mdx (2)

103-105: Verify reference block syntax is valid MDX.

The reference code block syntax on lines 103–105 is non-standard Markdown. Confirm this syntax is supported by your MDX renderer and that the GitHub URL format is correct for your documentation platform.


1-57: Contents section hierarchy looks good.

The restructured Contents section (lines 15–57) with nested hierarchy and clear anchors is well-organized and should render correctly in MDX. Indentation and anchor formatting are consistent.

.gitbook/developers-native/core/crisis.mdx (2)

1-110: Formatting standardization looks good—changes align with MDX conversion goals.

The documentation updates appropriately convert Markdown formatting to valid MDX syntax: backticks around technical terms (e.g., `x/crisis`), updated code block labels, and inline code formatting in table cells are all standard improvements for technical documentation rendering.


46-48: The protobuf reference convention is correctly applied but inconsistencies exist elsewhere.

The crisis.mdx change to \``protobuf referenceis consistent with the pattern used in feegrant.mdx, gov.mdx, and circuit.mdx—external GitHub repository references should use thereferencelabel. However, bank.mdx (line 131) incorrectly uses plain```protobuf` with an external URL, indicating the convention isn't uniformly applied across the codebase.

The PR change itself aligns with the emerging convention; verify all files modified in this PR follow the same pattern (external URLs = protobuf reference, inline code = plain protobuf).

## Concepts

Circuit Breaker is a module that is meant to avoid a chain needing to halt/shut down in the presence of a vulnerability, instead the module will allow specific messages or all messages to be disabled. When operating a chain, if it is app specific then a halt of the chain is less detrimental, but if there are applications built on top of the chain then halting is expensive due to the disturbance to applications.
Circuit Breaker is a module that is meant to avoid a chain needing to halt/shut down in the presence of a vulnerability, instead the module will allow specific messages or all messages to be disabled. When operating a chain, if it is app specific then a halt of the chain is less detrimental, but if there are applications built on top of the chain then halting is expensive due to the disturbance to applications.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Use hyphenated "app-specific" as a compound adjective.

When modifying noun phrases with multiple adjectives, use hyphens to join them. Replace "app specific" with "app-specific".

- Circuit Breaker is a module that is meant to avoid a chain needing to halt/shut down in the presence of a vulnerability, instead the module will allow specific messages or all messages to be disabled. When operating a chain, if it is app specific then a halt of the chain is less detrimental, but if there are applications built on top of the chain then halting is expensive due to the disturbance to applications. 
+ Circuit Breaker is a module that is meant to avoid a chain needing to halt/shut down in the presence of a vulnerability, instead the module will allow specific messages or all messages to be disabled. When operating a chain, if it is app-specific then a halt of the chain is less detrimental, but if there are applications built on top of the chain then halting is expensive due to the disturbance to applications.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
Circuit Breaker is a module that is meant to avoid a chain needing to halt/shut down in the presence of a vulnerability, instead the module will allow specific messages or all messages to be disabled. When operating a chain, if it is app specific then a halt of the chain is less detrimental, but if there are applications built on top of the chain then halting is expensive due to the disturbance to applications.
Circuit Breaker is a module that is meant to avoid a chain needing to halt/shut down in the presence of a vulnerability, instead the module will allow specific messages or all messages to be disabled. When operating a chain, if it is app-specific then a halt of the chain is less detrimental, but if there are applications built on top of the chain then halting is expensive due to the disturbance to applications.
🧰 Tools
🪛 LanguageTool

[grammar] ~5-~5: Use a hyphen to join words.
Context: ...ed. When operating a chain, if it is app specific then a halt of the chain is les...

(QB_NEW_EN_HYPHEN)

🤖 Prompt for AI Agents
In .gitbook/developers-native/core/circuit.mdx around line 5, the phrase "app
specific" is used as a compound adjective; replace it with the hyphenated form
"app-specific" to conform to compound-adjective style (i.e., change "if it is
app specific then" to "if it is app-specific then").

The module enables Cosmos SDK based blockchain to support an on-chain governance\
system. In this system, holders of the native staking token of the chain can vote\
on proposals on a 1 token 1 vote basis. Next is a list of features the module\
The module enables Cosmos SDK based blockchain to support an on-chain governance
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Fix hyphenation – "on-chain" should be hyphenated when used as a compound adjective before a noun. Line 13 should read: "The module enables Cosmos SDK based blockchain to support an on-chain governance system."

🧰 Tools
🪛 LanguageTool

[grammar] ~13-~13: Use a hyphen to join words.
Context: ...une 2016. The module enables Cosmos SDK based blockchain to support an on-chain ...

(QB_NEW_EN_HYPHEN)

🤖 Prompt for AI Agents
In .gitbook/developers-native/core/gov.mdx around line 13, the phrase "on chain
governance" needs to be hyphenated as a compound adjective; update the sentence
to read "The module enables Cosmos SDK based blockchain to support an on-chain
governance system." so "on-chain" is hyphenated and the noun "system" is present
as suggested.

### Constitution

`Constitution` is found in the genesis state. It is a string field intended to be used to descibe the purpose of a particular blockchain, and its expected norms. A few examples of how the constitution field can be used:
`Constitution` is found in the genesis state. It is a string field intended to be used to descibe the purpose of a particular blockchain, and its expected norms. A few examples of how the constitution field can be used:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Fix spelling error – "descibe" should be "describe" (Line 246: "intended to be used to describe the purpose").

🧰 Tools
🪛 LanguageTool

[grammar] ~246-~246: Ensure spelling is correct
Context: ...s a string field intended to be used to descibe the purpose of a particular blockchain,...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

🤖 Prompt for AI Agents
In .gitbook/developers-native/core/gov.mdx around line 246, fix the spelling
mistake "descibe" to "describe" in the sentence describing the Constitution
field; update the word only so the sentence reads "...intended to be used to
describe the purpose..." and run a quick spellcheck on nearby lines for similar
typos.

* Terra crash of May, 2022, saw validators choose to run a new binary with code that had not been approved by governance, because the governance token had been inflated to nothing.
* What is the purpose of the chain, specifically?
* best example of this is the Cosmos hub, where different founding groups, have different interpertations of the purpose of the network.
* best example of this is the Cosmos hub, where different founding groups, have different interpertations of the purpose of the network.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Fix spelling error – "interpertations" should be "interpretations" (Line 261: "have different interpretations of the purpose").

🧰 Tools
🪛 LanguageTool

[grammar] ~261-~261: Ensure spelling is correct
Context: ...fferent founding groups, have different interpertations of the purpose of the network. This ge...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

🤖 Prompt for AI Agents
In .gitbook/developers-native/core/gov.mdx around line 261, fix the spelling
mistake "interpertations" by changing it to "interpretations" so the sentence
reads "...have different interpretations of the purpose of the network." Ensure
only the single word is corrected and punctuation/spacing remains unchanged.

* best example of this is the Cosmos hub, where different founding groups, have different interpertations of the purpose of the network.

This genesis entry, "constitution" hasn't been designed for existing chains, who should likely just ratify a constitution using their governance system. Instead, this is for new chains. It will allow for validators to have a much clearer idea of purpose and the expecations placed on them while operating thier nodes. Likewise, for community members, the constitution will give them some idea of what to expect from both the "chain team" and the validators, respectively.
This genesis entry, "constitution" hasn't been designed for existing chains, who should likely just ratify a constitution using their governance system. Instead, this is for new chains. It will allow for validators to have a much clearer idea of purpose and the expecations placed on them while operating thier nodes. Likewise, for community members, the constitution will give them some idea of what to expect from both the "chain team" and the validators, respectively.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Fix spelling errors – "expecations" should be "expectations" and "thier" should be "their" (Line 263: "the expectations placed on them while operating their nodes").

🧰 Tools
🪛 LanguageTool

[grammar] ~263-~263: Ensure spelling is correct
Context: ... a much clearer idea of purpose and the expecations placed on them while operating thier no...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[grammar] ~263-~263: Ensure spelling is correct
Context: ...ecations placed on them while operating thier nodes. Likewise, for community members...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

🤖 Prompt for AI Agents
In .gitbook/developers-native/core/gov.mdx around line 263, fix two typos:
change "expecations" to "expectations" and "thier" to "their" so the sentence
reads "...the expectations placed on them while operating their nodes." Ensure
spelling is corrected exactly and preserve surrounding punctuation and
capitalization.

Comment on lines 566 to 573
## EventExec

| Type | Attribute Key | Attribute Value |
| ------------------------- | ------------- | ------------------------- |
| message | action | /cosmos.group.v1.Msg/Exec |
| cosmos.group.v1.EventExec | proposal\_id | {proposalId} |
| cosmos.group.v1.EventExec | logs | {logs\_string} |
| message | action | `/cosmos.group.v1.Msg/Exec` |
| cosmos.group.v1.EventExec | proposal_id | `{proposalId}` |
| cosmos.group.v1.EventExec | logs | `{logs_string}` |

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Fix heading level and event attribute inconsistency.

Line 566 uses ## EventExec (h2) but should be ### EventExec (h3) to match other event sections (lines 517, 524, 531, 538, 545, 552, 559, 574, 582). Additionally, line 572 incorrectly references proposal_id for EventExec—this attribute makes sense, but should be verified against the actual event definition.

Apply this diff:

- ## EventExec
+ ### EventExec
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
## EventExec
| Type | Attribute Key | Attribute Value |
| ------------------------- | ------------- | ------------------------- |
| message | action | /cosmos.group.v1.Msg/Exec |
| cosmos.group.v1.EventExec | proposal\_id | {proposalId} |
| cosmos.group.v1.EventExec | logs | {logs\_string} |
| message | action | `/cosmos.group.v1.Msg/Exec` |
| cosmos.group.v1.EventExec | proposal_id | `{proposalId}` |
| cosmos.group.v1.EventExec | logs | `{logs_string}` |
### EventExec
| Type | Attribute Key | Attribute Value |
| ------------------------- | ------------- | ------------------------- |
| message | action | `/cosmos.group.v1.Msg/Exec` |
| cosmos.group.v1.EventExec | proposal_id | `{proposalId}` |
| cosmos.group.v1.EventExec | logs | `{logs_string}` |
🤖 Prompt for AI Agents
In .gitbook/developers-native/core/group.mdx around lines 566 to 573, change the
heading from "## EventExec" to "### EventExec" to match other event sections,
and verify the EventExec attribute table: ensure the attribute keys/values match
the actual event definition (if the event uses proposal_id and logs, keep those
rows as "cosmos.group.v1.EventExec | proposal_id | {proposalId}" and
"cosmos.group.v1.EventExec | logs | {logs_string}"; if the real event uses
different attribute names, update the table entries to the correct attribute
key/value names).

Comment on lines +585 to +590
|-------------------------------------|---------------|---------------------------------|
| message | action | `/cosmos.group.v1.Msg/LeaveGroup` |
| cosmos.group.v1.EventProposalPruned | proposal_id | `{proposalId}` |
| cosmos.group.v1.EventProposalPruned | status | `{ProposalStatus}` |
| cosmos.group.v1.EventProposalPruned | tally_result | `{TallyResult}` |

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Fix EventProposalPruned table formatting and wrong action reference.

Line 585 has irregular table formatting (inconsistent separator alignment), and line 586 incorrectly lists /cosmos.group.v1.Msg/LeaveGroup as the action—this should reference the correct event action, likely /cosmos.group.v1.Msg/EventProposalPruned or similar, not LeaveGroup.

Apply this diff:

- |-------------------------------------|---------------|---------------------------------|
- | message                             | action        | `/cosmos.group.v1.Msg/LeaveGroup` |
+ | message                             | action        | `/cosmos.group.v1.Msg/ProposalPruned` |
  | cosmos.group.v1.EventProposalPruned | proposal_id   | `{proposalId}` |
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
|-------------------------------------|---------------|---------------------------------|
| message | action | `/cosmos.group.v1.Msg/LeaveGroup` |
| cosmos.group.v1.EventProposalPruned | proposal_id | `{proposalId}` |
| cosmos.group.v1.EventProposalPruned | status | `{ProposalStatus}` |
| cosmos.group.v1.EventProposalPruned | tally_result | `{TallyResult}` |
| message | action | description |
|-------------------------------------|---------------|------------------------------------|
| cosmos.group.v1.EventProposalPruned | proposal_id | `{proposalId}` |
| cosmos.group.v1.EventProposalPruned | status | `{ProposalStatus}` |
| cosmos.group.v1.EventProposalPruned | tally_result | `{TallyResult}` |
🤖 Prompt for AI Agents
In .gitbook/developers-native/core/group.mdx around lines 585 to 590, the
EventProposalPruned table has misaligned separators and an incorrect action
value; adjust the Markdown table so all rows use consistent pipe separators and
column counts, and replace the action cell `/cosmos.group.v1.Msg/LeaveGroup`
with the correct event action (e.g., `/cosmos.group.v1.Msg/EventProposalPruned`
or the exact event identifier used elsewhere) so the row reads: message | action
| `/cosmos.group.v1.Msg/EventProposalPruned`, keeping the other columns
unchanged and ensuring the header separator line matches the column count.

Comment on lines +15 to +21
if [ "$GH_CORE_USER" ] && [ "$GH_CORE_TOKEN" ]; then
echo "Using GitHub credentials for cloning injective-core"
INJ_CORE_GIT_URL="https://${GH_CORE_USER}:${GH_CORE_TOKEN}@github.com/InjectiveLabs/injective-core.git"
else
echo "Using org access to clone injective-core"
INJ_CORE_GIT_URL="[email protected]:InjectiveLabs/injective-core.git"
fi
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Clarify the hardcoded GitHub org-ID fallback.

The fallback URL at line 20 uses a hardcoded [email protected]. This appears to be a GitHub App installation ID but is not portable. Consider either:

  • Adding this as an environment variable with a default
  • Documenting its purpose and setup requirements in comments
  • Using SSH key-based auth or a GitHub token-based fallback

Example: Make this configurable:

+GH_ORG_ID=${GH_ORG_ID:-org-44571224}
...
-  INJ_CORE_GIT_URL="[email protected]:InjectiveLabs/injective-core.git"
+  INJ_CORE_GIT_URL="${GH_ORG_ID}@github.com:InjectiveLabs/injective-core.git"

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In scripts/copy-injective-docs.sh around lines 15 to 21, the fallback Git URL
uses a hardcoded [email protected] installation identifier which is not
portable; replace this hardcoded value with an environment-variable-driven
fallback (e.g., INJ_CORE_GIT_FALLBACK or INJ_GITHUB_APP_ID) that has a sensible
default, or switch to SSH/token-based fallback logic; update the script to read
that env var and construct INJ_CORE_GIT_URL from it, and add a brief comment
describing the purpose and setup requirements for the fallback so maintainers
know how to configure it.

Comment on lines +15 to +31
if [ "$GH_CORE_USER" ] && [ "$GH_CORE_TOKEN" ]; then
echo "Using GitHub credentials for cloning injective-core"
INJ_CORE_GIT_URL="https://${GH_CORE_USER}:${GH_CORE_TOKEN}@github.com/InjectiveLabs/injective-core.git"
else
echo "Using org access to clone injective-core"
INJ_CORE_GIT_URL="[email protected]:InjectiveLabs/injective-core.git"
fi
git clone "${INJ_CORE_GIT_URL}" "${BUILD_DIR}/injective-core" \
-b "${injective_core_branch}" \
--depth 1 \
--single-branch > /dev/null

echo "Cloning cosmos-sdk..."
git clone "https://github.com/InjectiveLabs/cosmos-sdk.git" "${BUILD_DIR}/cosmos-sdk" \
-b "${cosmos_sdk_branch}" \
--depth 1 \
--single-branch > /dev/null
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Add error handling after git clone operations.

If either clone fails, the script silently continues and later attempts to execute/copy from non-existent directories. Add explicit checks or use set -e and error traps.

Consider adding the following at the start of the script to exit immediately on errors:

+#!/usr/bin/env bash
+set -e
+set -o pipefail
+trap 'echo "Error: $?" >&2' ERR
+

Then ensure git clone output is captured and checked:

 git clone "${INJ_CORE_GIT_URL}" "${BUILD_DIR}/injective-core" \
   -b "${injective_core_branch}" \
   --depth 1 \
-  --single-branch > /dev/null
+  --single-branch > /dev/null || { echo "Failed to clone injective-core"; exit 1; }

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In scripts/copy-injective-docs.sh around lines 15 to 31, the git clone
operations have no error handling so the script continues on failure; add robust
failure handling by enabling strict mode (e.g., set -euo pipefail) and an ERR
trap at the top of the script to print a clear error and exit, and for each git
clone check the command exit status (or append || { echo "Failed to clone
<repo>"; exit 1; }) so failures abort immediately with a helpful message instead
of continuing with missing directories.

Comment on lines +37 to +48
for D in ./$BUILD_DIR/cosmos-sdk/x/*; do
if [ -d "${D}" ]; then
mkdir -p "$CORE_DIR/$(echo $D | awk -F/ '{print $NF}')" && cp -r $D/README.md "$_"
fi
done

# copy from the injective-core repo files injective-chain/modules/*/spec/* into this repo
for D in ./$BUILD_DIR/injective-core/injective-chain/modules/*; do
if [ -d "${D}" ]; then
mkdir -p "$INJECTIVE_DIR/$(echo $D | awk -F/ '{print $NF}')" && cp -r $D/spec/* "$_"
fi
done
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion | 🟠 Major

Use more robust path extraction instead of awk.

Extracting directory names with awk -F/ '{print $NF}' is fragile and breaks with spaces/special chars in paths. Use basename instead.

Apply this diff:

 # copy from the cosmos-sdk repo files x/*/README.md into this repo
 for D in ./$BUILD_DIR/cosmos-sdk/x/*; do
   if [ -d "${D}" ]; then
-    mkdir -p "$CORE_DIR/$(echo $D | awk -F/ '{print $NF}')" && cp -r $D/README.md "$_"
+    module_name=$(basename "$D")
+    mkdir -p "$CORE_DIR/$module_name" && cp -r "$D/README.md" "$CORE_DIR/$module_name/"
   fi
 done
 
 # copy from the injective-core repo files injective-chain/modules/*/spec/* into this repo
 for D in ./$BUILD_DIR/injective-core/injective-chain/modules/*; do
   if [ -d "${D}" ]; then
-    mkdir -p "$INJECTIVE_DIR/$(echo $D | awk -F/ '{print $NF}')" && cp -r $D/spec/* "$_"
+    module_name=$(basename "$D")
+    mkdir -p "$INJECTIVE_DIR/$module_name" && cp -r "$D/spec/"* "$INJECTIVE_DIR/$module_name/"
   fi
 done
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
for D in ./$BUILD_DIR/cosmos-sdk/x/*; do
if [ -d "${D}" ]; then
mkdir -p "$CORE_DIR/$(echo $D | awk -F/ '{print $NF}')" && cp -r $D/README.md "$_"
fi
done
# copy from the injective-core repo files injective-chain/modules/*/spec/* into this repo
for D in ./$BUILD_DIR/injective-core/injective-chain/modules/*; do
if [ -d "${D}" ]; then
mkdir -p "$INJECTIVE_DIR/$(echo $D | awk -F/ '{print $NF}')" && cp -r $D/spec/* "$_"
fi
done
# copy from the cosmos-sdk repo files x/*/README.md into this repo
for D in ./$BUILD_DIR/cosmos-sdk/x/*; do
if [ -d "${D}" ]; then
module_name=$(basename "$D")
mkdir -p "$CORE_DIR/$module_name" && cp -r "$D/README.md" "$CORE_DIR/$module_name/"
fi
done
# copy from the injective-core repo files injective-chain/modules/*/spec/* into this repo
for D in ./$BUILD_DIR/injective-core/injective-chain/modules/*; do
if [ -d "${D}" ]; then
module_name=$(basename "$D")
mkdir -p "$INJECTIVE_DIR/$module_name" && cp -r "$D/spec"/* "$INJECTIVE_DIR/$module_name/"
fi
done
🤖 Prompt for AI Agents
In scripts/copy-injective-docs.sh around lines 37 to 48, the code uses awk -F/
'{print $NF}' to extract directory names which breaks on paths with
spaces/special chars; replace those awk calls with basename and ensure all path
variables are quoted (e.g. use basename "$D") and keep the mkdir -p and cp steps
the same, taking care to handle trailing slashes by passing the directory path
to basename and quoting source and destination arguments to cp and mkdir to
preserve correctness with spaces/special characters.

@bguiz bguiz merged commit 97e9b62 into main Oct 29, 2025
4 checks passed
ThomasRalee added a commit that referenced this pull request Dec 23, 2025
ThomasRalee added a commit that referenced this pull request Dec 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants